package com.chen.Main;

import com.chen.pojo.User;
import org.springframework.context.ApplicationContext;
import org.springframework.context.support.ClassPathXmlApplicationContext;

public class UserMain {
    public static void main(String[] args) {
        ApplicationContext context = new ClassPathXmlApplicationContext("Beans.xml");
        User user = (User) context.getBean("user");
        user.getName();
        System.out.println("---------");
        User userN = (User) context.getBean("userNew");
        userN.getName();
        System.out.println("---------");
        User user1 = (User) context.getBean("u1");
        user1.getName();


    }
}
